package model


import (
	"database/sql"
	"fmt"
	_ "github.com/lib/pq"
)
var DB *sql.DB
func InitDB(connectInfo string) {
	database, err := sql.Open("postgres", connectInfo)
	if err != nil {
		fmt.Println("open mysql failed,", err)
	}
	err = database.Ping()
	if err != nil {
		fmt.Println("open mysql failed,", err)
	}

	DB = database

}

